package com.dunjx.user.service.impl;


import com.dunjx.user.pojo.RegionCity;

import com.dunjx.user.dao.RegionCityMapper;
import com.dunjx.user.service.RegionCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/****
 * @Author:admin
 * @Description:RegionCity业务层接口实现类
 * @Date 2019/6/14 0:16
 *****/
@Service
public class RegionCityServiceImpl implements RegionCityService {


    @Autowired
    private RegionCityMapper regionCityMapper;

    /**
     * 根据父id查询 城市列表
     *
     * @param pid
     * @return
     */
    @Override
    public List<RegionCity> searchByPid(Integer pid) {

        RegionCity regionCity = new RegionCity();
        regionCity.setParentId(pid);
        return regionCityMapper.select(regionCity);

    }
}
